package com.lyx.Demo;

import java.util.Arrays;

public class Demo04 {

    private String[] names;

    private int age;
    private Double height;
    private Integer b;

    public int getAge() {
        return this.age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void a(String... names){
        this.names = names;
    }

    public String[] getNames() {
        return names;
    }

    public void setNames(String[] names) {
        this.names = names;
    }

    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    public Integer getB() {
        return b;
    }

    public void setB(Integer b) {
        this.b = b;
    }

    @Override
    public String toString() {
        return "Demo04{" +
                "names=" + Arrays.toString(names) +
                ", age=" + age +
                ", height=" + height +
                ", b=" + b +
                '}';
    }

    private void ad(){

    }

    public static void main(String[] args) {
        Demo04 demo04 = new Demo04();
        demo04.a("a","b");
        System.out.println(demo04);
        Integer n = 15; // n的值为15
        Double x = 12.0;
        demo04.setB(n); // 传入n的值
        demo04.setHeight(x);
        System.out.println(demo04.getB() +" "+demo04.getHeight()); // 15
        n = 20; // n的值改为20
        x = 33.00;
        System.out.println("===========");
        System.out.println(demo04.getB()+" "+demo04.getHeight()); // 15还是20?
        demo04.a(null);
        System.out.println(demo04);
    }
}
